package com.ruoyi.fts.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fts.mapper.FtsStatementMapper;
import com.ruoyi.fts.domain.FtsStatement;
import com.ruoyi.fts.service.IFtsStatementService;

/**
 * 协议声明Service业务层处理
 *
 * @author lumberer
 * @date 2024-11-08
 */
@Service
public class FtsStatementServiceImpl extends ServiceImpl<FtsStatementMapper, FtsStatement> implements IFtsStatementService {
    @Autowired
    private FtsStatementMapper ftsStatementMapper;

    /**
     * 查询协议声明
     *
     * @param id 协议声明主键
     * @return 协议声明
     */
    @Override
    public FtsStatement selectFtsStatementById(Long id) {
        return ftsStatementMapper.selectFtsStatementById(id);
    }

    /**
     * 查询协议声明列表
     *
     * @param ftsStatement 协议声明
     * @return 协议声明
     */
    @Override
    public List<FtsStatement> selectFtsStatementList(FtsStatement ftsStatement) {
        return ftsStatementMapper.selectFtsStatementList(ftsStatement);
    }

    /**
     * 新增协议声明
     *
     * @param ftsStatement 协议声明
     * @return 结果
     */
    @Override
    public int insertFtsStatement(FtsStatement ftsStatement) {
                ftsStatement.setCreateTime(DateUtils.getNowDate());
            return ftsStatementMapper.insert(ftsStatement);
    }

    /**
     * 修改协议声明
     *
     * @param ftsStatement 协议声明
     * @return 结果
     */
    @Override
    public int updateFtsStatement(FtsStatement ftsStatement) {
                ftsStatement.setUpdateTime(DateUtils.getNowDate());
        return ftsStatementMapper.updateById(ftsStatement);
    }

    /**
     * 批量删除协议声明
     *
     * @param ids 需要删除的协议声明主键
     * @return 结果
     */
    @Override
    public int deleteFtsStatementByIds(Long[] ids) {
        return ftsStatementMapper.deleteFtsStatementByIds(ids);
    }

    /**
     * 删除协议声明信息
     *
     * @param id 协议声明主键
     * @return 结果
     */
    @Override
    public int deleteFtsStatementById(Long id) {
        return ftsStatementMapper.deleteFtsStatementById(id);
    }
}